Can my Facelets converter depend on a `ui:repeat` loop var?

Posted by harto on Stack Overflow See other posts from Stack Overflow or by harto
Published on 2010-05-20T02:37:27Z Indexed on 2010/05/20 2:40 UTC
Read the original article Hit count: 296

Filed under:
|
|

The following doesn't work as I'd hoped:

<ul>
    <ui:repeat var="i" value="#{fn:split('1,2,3,4', ',')}">
        <li>
            <h:outputText value="1.2345">
                <f:convertNumber
                        minFractionDigits="#{i}"
                        maxFractionDigits="#{i}" />
            </h:outputText>
        </li>
    </ui:repeat>
</ul>

I was hoping to see:

  • 1.2
  • 1.23
  • 1.234
  • 1.2345

Instead I see:

  • 1
  • 1
  • 1
  • 1

What am I missing?

My real use-case involves a RichFaces rich:dataTable component instead of a ui:repeat, but the gist is the same.

© Stack Overflow or respective owner

Related posts about jsf

Related posts about facelets